<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragment::head(~{::title})">
    <meta charset="UTF-8">
    <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>登 录</title>
    <link href="../../static/css/semantic.min.css" rel="stylesheet">
    <link href="../../static/css/style.css" rel="stylesheet">
</head>
<body>
    <div class="m-container m-padding-tp-small " style="max-width: 30em !important;">
        <div class="ui middle aligned center aligned grid m-padding-lr-small">
            <div class="column">
                <h2 class="ui teal header">
                   Y,Blog 后台管理
                </h2>
                <form class="ui large form" method="post" th:action="@{/admin/login}">
                    <div class="ui segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="Username">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="Password">
                            </div>
                        </div>
                        <button class="ui fluid large teal submit button">Login</button>
                    </div>
                    <div class="ui error message"></div>
                    <div class="ui mini negative message " th:unless="${#strings.isEmpty(message)}" th:text="${message}"></div>
                </form>
            </div>
        </div>
    </div>

<!--/*/<th:block th:replace="admin/_fragment::script">/*/-->
<script src="../../static/js/jquery.min.js"></script>
<script src="../../static/js/semantic.min.js"></script>
<!--/*/</th:block>/*/-->
<script>
    $('.ui.form').form({
        fields: {
            username: {
                identifier: 'username',
                rules:[{
                    type: 'empty',
                    prompt: '请输入用户名'
                }]
            },
            password: {
                identifier: 'password',
                rules:[{
                    type: 'empty',
                    prompt: '请输入密码'
                }]
            }
        }
    })
</script>
</body>
</html>